package org.example.abstractFactoryPattern;

import org.example.factoryPattern.Phone;

/**
 * @author LiXingShuai
 * @className ComputerFactory
 * @description: TODO
 * @date 2023年04月16日
 * @version: 1.0
 */
public class ComputerFactory implements AbstractFactory{
    @Override
    public Computer makeComputer(String brand) {
        if (brand == null) {
            return null;
        } else if ("mac".equals(brand)) {
            return new ComputerMac();
        } else if ("huawei".equals(brand)) {
            return new ComputerHuaWei();
        }
        return null;
    }

    @Override
    public Phone makePhone(String brand) {
        return null;
    }
}
